#ifdef HAVE_CONFIG_H
#  include "config.h"
#endif

#ifdef HAVE_STDLIB_H
#  include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
#  include <string.h>
#endif

#ifndef HAVE_STRDUP
char *strdup(const char *s){
  char *rv = NULL;
  if(s != NULL){
    rv = malloc((strlen(s) + 1) * sizeof(char));
    if(rv != NULL) strcpy(rv, s);
  }
  return rv;
}
#endif
